<template>
    <div class="father15">
        <h3>实现两个组件之间的路由切换</h3>
        <div class="show_main">
            <div class="navItems">
                <ul>
                    <li>
                        <router-link to="/home">进入Home组件</router-link>
                    </li>
                    <li>
                        <router-link to="/about">进入About组件</router-link>
                    </li>
                </ul>
            </div>
            <div class="show_coms">
                <router-view></router-view>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'Father15',
}
</script>

<style scoped>
.father15 {
    width: 600px;
    height: 420px;
    border: 1px solid pink;
    border-radius: 20px;
}

h3 {
    width: 100%;
    text-align: center;
}

.show_main {
    width: 90%;
    height: 200px;
    margin: auto;
    display: flex;
}

.navItems {
    width: 120px;
    height: 100px;
    border-radius: 20px;
}

ul {
    list-style-type: none;
    width: 100%;
    height: 100%;
}

li {
    width: 100%;
    height: 40px;
    text-align: center;
    line-height: 40px;
    background-color: darkgray;
    border-radius: 12px;
    margin-top: 5px;
    color: #fff;
    cursor: pointer;
}

a {
    text-decoration: none;
    color: #fff;
}

.show_coms {
    width: 320px;
    height: 100px;
    margin-left: 80px;
    padding-top: 25px;
    box-sizing: border-box;
    text-align: center;
}
</style>